this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};this.BX.Landing.Ui=this.BX.Landing.Ui||{};(function(e,t,i,n){"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){babelHelpers.defineProperty(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var s=function(e){babelHelpers.inherits(i,e);function i(){var e;var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};babelHelpers.classCallCheck(this,i);e=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(i).call(this,a(a({},n),{},{content:n.content||n.value||"",textOnly:true})));t.Event.bind(e.input,"click",e.onInputClick.bind(babelHelpers.assertThisInitialized(e)));return e}babelHelpers.createClass(i,[{key:"getFormat",value:function e(){return BX.date.convertBitrixFormat(n.Loc.getMessage(this.options.time?"FORMAT_DATETIME":"FORMAT_DATE"))}},{key:"showDatepicker",value:function e(){var t=this;this.getContext().BX.calendar({node:this.input,field:this.input,bTime:this.options.time,value:BX.date.format(this.getFormat(),this.getValue()||new Date),bHideTime:!this.options.time,callback_after:function e(i){t.setValue(BX.date.format(t.getFormat(),i))}})}},{key:"setValue",value:function e(t){babelHelpers.get(babelHelpers.getPrototypeOf(i.prototype),"setValue",this).call(this,t);this.emit("onChange")}},{key:"onInputClick",value:function e(){this.showDatepicker()}}]);return i}(i.BaseField);e.DateTimeField=s})(this.BX.Landing.Ui.Field=this.BX.Landing.Ui.Field||{},BX,BX.Landing.UI.Field,BX.Landing);
//# sourceMappingURL=datetimefield.bundle.map.js